using System;
using PropertyExpression.Common;

namespace PropertyExpression.ControllableQuery.Test.Queries.StringBuilding
{
    public interface IPublicationTypeInfo
    {
        Guid PublicationTypeId { get; }
        int Code { get; }
        IOption<NVarChar<L4000>> Description { get; }
        Decimal<P18, S7> Decimal1 { get; }
        Money Money1 { get; }
    }

    public class PublicationTypeSelectQuery : IQuery<IPublicationTypeInfo>
    {
        private readonly IParam<Guid> publicationTypeId;

        public PublicationTypeSelectQuery(IParam<Guid> publicationTypeId)
        {
            this.publicationTypeId = publicationTypeId;
        }

        public string TransformText()
        {
            return new Q(@"SELECT
    *
FROM
    PublicationType
WHERE
    PublicationTypeId = ")._(publicationTypeId).ToString();
        }
    }
}